package com.haoshuang.zhouzhoubang.ui.adapter


import android.graphics.Color

import com.chad.library.adapter4.BaseQuickAdapter
import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemSkillBinding
import com.haoshuang.zhouzhoubang.model.bean.SortBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter


/**
 * 订单模块中的订单列表适配器
 * */
class SkillLeftAdapter(data: MutableList<SortBean>) :
    BaseBindingQuickAdapter<SortBean, ItemSkillBinding>(data) {

    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: SortBean?) {
        val binding = ItemSkillBinding.bind(holder.itemView)
        binding.apply {
            tvName.text = item?.cate_name
            if (item?.isCheck == 0) {
                llB.setBackgroundColor(Color.parseColor("#f5f5f5"))
            } else {
                llB.setBackgroundColor(Color.parseColor("#ffffff"))
            }
        }
    }

}